AddSubForm
Use this procedure/function to add a sections from a subform into the current document.
Syntax
AddSubform (Form, Section, Form, Group, Flag)
Parameter |
Description |
Defaults |
---|---|---|
Form (Subform |
The name of the subform. . |
No Default |
Section |
Enter the name of a section which will precede the new subform |
The current section |
Form |
Enter the name of a form in the form set. If you specify the Section parameter, that section must occur on this form. . |
The current form |
Group |
Enter the name of a group that contains the specified form. |
The current group. |
Flag |
Determines if the section is inserted on the same page or on a new page. 0 - (zero) new page |
zero (0). |
Optionally, this procedure returns one (1) on success or zero (0) on failure.
This procedure adds a copy of each section in the specified subform to a form. The system loads the new sections onto the page after the section, form, or group you specified or onto a new page which it creates after the section, form, or group you specified.
Note
-
If you use this procedure to add sections to forms and you also plan to import and export those forms, be sure to set the IgnoreInvalidImage option in the ImpFile_cd control group in the FSISYS.INI file. Otherwise, users will receive an error message. For detailed instructions, see the Documaker Desktop Administration Guide
Any sections you add using this procedure is positioned the same way as other sections. The specific location of sections is determined by your master resource setup.
Use the Refresh procedure after this procedure to refresh the screen display.
When adding Subform sections
When adding a Subform, there is no way for you to specify what section options or recipients you want included on the new sections. So, the AddSubform procedure takes the missing information from an associated section.
The system will, however, exclude the In-lined, Copy on Overflow, Duplex Front, Duplex Back, and Caused by Overflow settings. These options are not normally associated with a sections being added via DAL.
Example
Here are some examples:
Procedure |
Result |
Explanation |
AddSubform ("SEC1") |
1 - if successfully added 0 - if not added |
Insert the sections from subform IMG1, on a new page after the current page. . |
AddSubform("NEW1", "SEC\3",,"GRP") |
1 - if successfully added 0 - if not added |
Insert the sections from subform NEW1, after the third occurrence of IMG, within GRP. This section is placed on a new page after the third occurrence of the specified section. |
AddSubform ("SEC1",,,, 1) |
1 - if successfully added 0 - if not added. |
Insert the sections from subform IMG1, after the current section on the same page |
AddSubform("NEW1", "SEC\3", , , 1) |
1 - if successfully added 0 - if not added |
Insert the sections from subform NEW1, after the third occurrence of IMG on the same page |
Use this procedure/function to add a sections from a subform into the current document